package cn.tedu.zx.pojo.admin.parm;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class AdminAddNewParam implements Serializable {

    @ApiModelProperty(value = "管理员名称", required = true, example = "雪碧的管理员")
 //    @NotNull(message = "必须提交管理员名称！")
    private String username;

    @ApiModelProperty(value = "管理员密码", required = true, example = "雪碧的密码")
 //   @NotNull(message = "必须提交管理员密码！")
    private String password;

    @ApiModelProperty(value = "管理员昵称", required = true, example = "雪碧的昵称")
 //   @NotNull(message = "必须提交管理员昵称！")
    private String nickname;

    @ApiModelProperty(value = "管理员手机号码", required = true, example = "雪碧的手机号码")
 //   @NotNull(message = "必须提交管理员手机号码！")
    private String phone;

    @ApiModelProperty(value = "管理员邮箱", required = true, example = "雪碧的邮箱")
 //   @NotNull(message = "必须提交管理员邮箱！")
    private String email;

    @ApiModelProperty(value = "管理员头像", required = true, example = "雪碧的头像")
 //   @NotNull(message = "必须提交管理员头像！")
    private String icon;


    @ApiModelProperty(value = "是否启用，1=启用，0=未启用", required = true, example = "1")
    @Range(max = 1, min = 0, message = "enable必须是0或1数字 ")
//    @NotNull(message = "必须提交是否启用！")
    private Integer isEnable;


    @ApiModelProperty(value = "管理员序号", required = true, example = "雪碧的序号")
 //   @NotNull(message = "必须提交管理员序号！")
    private String sort;

    /**
     * 管理员的角色ID的数组
     */
//    @NotNull(message = "添加管理员失败，请至少选择1种角色！")
    @Size(min = 1, message = "添加管理员失败，请至少选择1种角色！")
    private Long[] roleIds;

}
